home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / science / sm32a.zip / LIBRARY / FAC.LI < prev    next >
Text File  |  1993-12-23  |  264b  |  12 lines

  1. #    n! = fac(n), factorial
  2. #    e.g. 3!=1*2*3=6
  3.  
  4. 0! := 1
  5. 1! := 1
  6. inf! := inf
  7. n_ ! := if(n>170, inf)
  8. x_ ! := if(x>1, x*(x-1)! )
  9.  
  10. #x_ ! := if( numeric==on, gamma(x+1), if(x>1 x*(x-1)! ))
  11. #n_! := if( n>1 and isinteger(n), n*(n-1)!, if(numeric==on, gamma(n+1))
  12.